<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./assets/font/iconfont.css">
    <style>
        .container {
            width: 800px;
            height: 220px;
            border: 1px solid black;
            margin: 50px auto;
        }

        .top {
            width: 100%;
            height: 70px;
            border-bottom: 1px solid black;
        }

        .bottom {
            height: 150px;
            line-height: 150px;
            display: flex;
            justify-content: space-around;

        }

        .bottom div span {
            font-size: 40px;

        }

        .bottom div {
            width: 100px;
            height: 100px;
            /* border-radius: 50%; */
            /* border: 1px solid black; */
            text-align: center;
            line-height: 100px;
        }

        .active {
            border-radius: 50%;
            border: 1px solid black;
            transform: translateY(-50px);
            transition: all 400ms ease;
            /* animation: aa 1s linear 0s infinite normal none; */

        }

        @keyframes aa {
            0% {
                transform: translateY(0px);
            }

            100% {
                transform: translateY(-50px);
            }

        }
    </style>
</head>

<body>
    <div class="container">
        <div class="top"></div>
        <div class="bottom">
            <div id="d1"><span class="iconfont icon-wode"></span></div>
            <div id="d2"><span class="iconfont icon-shouye"></span></div>
            <div id="d3"><span class="iconfont icon-tixing"></span></div>
            <div id="d4"><span class="iconfont icon-tuite"></span></div>
        </div>

    </div>
</body>
<script>

    // let boxs=document.querySelectorAll('.bottom>div')
    // boxs.forEach(function(item,index){
    //     // console.log(item)
    //   item.addEventListener('click',function(){

    //       boxs.forEach(function(tempDom){
    //           tempDom.classList.remove('active')
    //         })
    //         item.classList.add('active')




    //   })
    // })

    let d1 = document.getElementById('d1')
    d1.onclick = function () {
        d1.classList.add('active')
    }


    let d2 = document.getElementById('d2')
    d2.onclick = function () {
        d2.classList.add('active')
    }

    let d3 = document.getElementById('d3')
    d3.onclick = function () {
        d3.classList.add('active')
    }


    let d4= document.getElementById('d4')
    d4.onclick = function () {
        d4.classList.add('active')
    }



</script>

</html>